// -----------------------------------------------------------------------
//  <copyright file="AreaInfoAttribute.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2022 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://www.dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2022-12-09 20:51</last-date>
// -----------------------------------------------------------------------


namespace DaprPlus.AspNetCore.Mvc;

/// <summary>
/// 区域信息特性，可配置区域显示名称，此属性与“<see cref="AreaAttribute"/>与<see cref="DisplayNameAttribute"/>”组合等效，在无Area的类型，推荐只使用<see cref="DisplayNameAttribute"/>
/// </summary>
public class AreaInfoAttribute : AreaAttribute
{
    /// <summary>
    /// 初始化一个新 <see cref="T:Microsoft.AspNetCore.Mvc.AreaAttribute" /> 实例。
    /// </summary>
    /// <param name="areaName">包含控制器或操作的区域。</param>
    public AreaInfoAttribute(string areaName)
        : base(areaName)
    {
        Display = areaName;
    }

    /// <summary>
    /// 获取或设置 区域的显示名称
    /// </summary>
    public string Display { get; set; }
}
